﻿/*******************************************************************************
 * Copyright © 2017 
 * Author: hyf
 * Description:数据库连接可切换
 * Date:2017-05-05 08:45:32
*********************************************************************************/
using SqlSugarRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NFine.Data.DBContext
{
    public class MyRepository
    {
        private static string DefaultConnection = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
        private static string ABCConnection = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;

        /// <summary>
        /// 主连接
        /// </summary>
        public ConnectionConfig DefaultConnectionConfig =
        new ConnectionConfig() { ConnectionString = DefaultConnection, DbType = DbType.SqlServer };

        /// <summary>
        /// ABC配置
        /// </summary>
        public ConnectionConfig ABCConnectionConfig =
        new ConnectionConfig() { ConnectionString = ABCConnection, DbType = DbType.SqlServer };
    }
}

